Skip to content

Add Docker Engine client for Unix socket connectivity#2

Merged
vxnkjyffmq-code merged 7 commits into
vxnkjyffmq-code-patch-1from
copilot/connect-to-docker-engine
Feb 14, 2026
Merged

Add Docker Engine client for Unix socket connectivity#2
vxnkjyffmq-code merged 7 commits into
vxnkjyffmq-code-patch-1from
copilot/connect-to-docker-engine

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 14, 2026

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

Enables interoperability with Docker Engine daemons. Adds minimal client for connectivity verification and version retrieval over Unix sockets.

Implementation:

  • DockerEngineClient with async/await API using Swift NIO
  • Connects to /var/run/docker.sock by default, configurable
  • HTTP-over-Unix-socket with simplified response parsing
  • Proper error types: socketNotFound, connectionFailed, invalidResponse, requestFailed

API Example:

let client = DockerEngineClient()
let connected = try await client.connect()
let version = try await client.getVersion()

Known Limitations (Documented):

  • Simplified HTTP parsing (no chunked encoding support)
  • Polling-based reads (~50ms max latency)
  • EventLoopGroup per-request overhead
  • Suitable for infrequent connectivity checks, not high-throughput

Future enhancements: EventLoopGroup reuse, proper NIO handlers, comprehensive HTTP parsing.

Files:

  • Sources/Services/ContainerAPIService/Client/DockerEngineClient.swift (204 lines)
  • Tests/ContainerAPIClientTests/DockerEngineClientTests.swift (60 lines)
  • Documentation: docker-engine-client-example.md, updates to how-to.md, technical-overview.md

Testing

  • Tested locally (requires macOS 15+ with Apple silicon)
  • Added/updated tests (unit tests for initialization, failures, errors)
  • Added/updated docs (comprehensive examples and limitations)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits February 14, 2026 07:22
Co-authored-by: vxnkjyffmq-code <245266972+vxnkjyffmq-code@users.noreply.github.com>
Co-authored-by: vxnkjyffmq-code <245266972+vxnkjyffmq-code@users.noreply.github.com>
Co-authored-by: vxnkjyffmq-code <245266972+vxnkjyffmq-code@users.noreply.github.com>
Co-authored-by: vxnkjyffmq-code <245266972+vxnkjyffmq-code@users.noreply.github.com>
Co-authored-by: vxnkjyffmq-code <245266972+vxnkjyffmq-code@users.noreply.github.com>
Co-authored-by: vxnkjyffmq-code <245266972+vxnkjyffmq-code@users.noreply.github.com>
Copilot AI changed the title [WIP] Connect to a Docker engine Add Docker Engine client for Unix socket connectivity Feb 14, 2026
@vxnkjyffmq-code vxnkjyffmq-code marked this pull request as ready for review February 14, 2026 18:45
@vxnkjyffmq-code vxnkjyffmq-code merged commit c5ac151 into vxnkjyffmq-code-patch-1 Feb 14, 2026
2 checks passed
Copy link
Copy Markdown
Owner

@vxnkjyffmq-code vxnkjyffmq-code left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants